Add --vsver selection and rb msvc list - #5
Merged
Conversation
The activation commands always resolved the newest Visual Studio via vswhere -latest. A product year (2017/2019/2022/2026) can now be pinned per invocation with --vsver or per session with RBMANAGER_VSVER, mapped to vswhere -version ranges, and rb msvc list shows the installed toolchains. The year is derived from the installationVersion major because the Dev18 series reports catalog.productLineVersion "18" even though its displayName says 2026. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers the argument parsers, the flag/env precedence, the missing-year warning, and per-year resolution against real installs. Plan cases are numbered 76-85 because 75 was already taken by the AOT publish smoke. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rb msvc enableandrb msvc execalways activated the newest Visual Studio that vswhere finds. This adds a way to pin the product year without changing that default, which stays safe because every VS 2015+ toolset is ABI-compatible withx64-mswin64_140.The value is
2017|2019|2022|2026|latestand can also be set per session viaRBMANAGER_VSVER. The flag wins. Forexecthe option is recognized only before the command and--ends option parsing. When the requested year is not installed, the warning lists the installed years and the matching Build Tools winget id. The year shown byrb msvc listis derived from theinstallationVersionmajor because the Dev18 series reportscatalog.productLineVersionas18while its display name says 2026. Verified against a machine with all four generations installed.